package cn.simon.free.filter.core;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;

/**
 * 日志打印过滤器bean注册实现
 *
 * @author simon
 * @date 2020/5/29 15:10
 * @copyright:
 * @modifier
 * @motto a no talent, people who have to study hard
 */
public class FilterLogImport {
    public FilterLogImport() {
        // don't something
    }

    @Bean
    public FilterRegistrationBean filterLogBeanRegister() {
        FilterRegistrationBean<FilterLogCore> registration = new FilterRegistrationBean(new FilterLogCore());
        registration.addUrlPatterns("/*");
        registration.setName("log print filter");
        registration.setOrder(Integer.MIN_VALUE);
        return registration;
    }
}
